package com.example.mushroom.mapper;

import com.example.mushroom.entity.Environment;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface EnvironmentMapper {

    // 插入种植环境

    int insertEnvironment(Environment environment);

    // 根据ID查询种植环境

    Environment selectEnvironmentById(Integer id);

    // 查询所有种植环境

    List<Environment> selectAllEnvironments();

    // 更新种植环境信息

    int updateEnvironment(Environment environment);

    // 根据ID删除种植环境

    int deleteEnvironmentById(Integer id);

    // 分页查询种植环境
    List<Environment> selectEnvironmentsByPage(@Param("offset") int offset, @Param("limit") int limit);
}